import Cookies from 'js-cookie'
const TokenKey = 'Admin-Token'
export default {
  getToken: function () {
    return Cookies.get(TokenKey)
  },
  setToken: function (token: string) {
    return Cookies.set(TokenKey, token, { expires: 1 })
  },
  removeToken: function () {
    return Cookies.remove(TokenKey)
  },
  removeUserInfo: function () {
    this.removeToken()
    // Cookies.remove('yourPassword')
    // Cookies.remove('yourStuNum')
    Cookies.remove('userTx')
  },
}
